package com.example.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDate;
import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 员工表
 *
 * @author author
 * @since 2024-07-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("user")
@ApiModel("员工表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "员工id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "员工姓名")
    private String name;

    @ApiModelProperty(value = "用户账号")
    private String username;

    @ApiModelProperty(value = "用户密码")
    private String password;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "电话")
    private String phone;

    @ApiModelProperty(value = "团队id")
    private Integer teamId;

    @ApiModelProperty(value = "邮件")
    private String email;

    @ApiModelProperty(value = "员工状态")
    private Integer status;

    @ApiModelProperty(value = "入职时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "是否删除 0：未删除；1：已删除")
    private Integer isDeleted;

    @ApiModelProperty(value = "用户头像")
    private String avatar;

    @ApiModelProperty(value = "身份")
    private String role;

    @ApiModelProperty(value = "自我介绍")
    private String decription;

    @ApiModelProperty(value = "用户地址")
    private String address;

    /** 乐观锁版本号 */
    @ApiModelProperty("乐观锁版本号")
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;


}
